﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PServiceBus.Core.Interface;
using PServiceBus.Core.Provider;
using PServiceBus.Core.Runtime.Transports;
using PServiceBus.Core.Logger;
using PServiceBus.Core.Manager;

namespace PServiceBus.Core.Runtime.Messages {
    [Serializable]
    public class PublishedMessage : BaseMessage, IDeleteable {
        public PublishedMessage() : base(){ }
        public PublishedMessage(TransportMessage message, Guid topicID) : base(message, topicID) { }
        /// <summary>
        /// Save message content
        /// </summary>
        public void Save() {
            PublishedMessageManager.Attach(this);
        }

        public MessageType Type { get; set; }
    }
}
